package com.es.www.second;

import java.math.BigDecimal;

import com.es.www.first.PurchaseRequest;

/**
 * @Created by michangtao
 * @Date 2022/5/25 10:08
 * @Description
 */
public class DepartmentHandler extends AbstractHandler{

    public DepartmentHandler(String name) {
        super(name);
    }

    @Override
    public void process() {
        PurchaseRequest request = (PurchaseRequest) processMap.get(MAP_KEY);
        if(request.getPrice().compareTo(BigDecimal.valueOf(3000)) < 0){
            System.out.println(request.getPrice() + "元的" + request.getName() + "被" + name + "审批了");
        }
    }
}
